<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>04如何设置kindeditor的值</title>
		<!-- 添加kindeditor的引用 -->
		<script type="text/javascript" charset="utf-8" src="js/kindeditor/kindeditor.js"></script>
		<script type="text/javascript" charset="utf-8" src="js/kindeditor/lang/zh_CN.js"></script>
	</head>

	<script>
		var editor;
		KindEditor.ready(function(K){
			editor = K.create('textarea[id="content"]',{
				allowFileManager : true
			});
		});
		//设置kindeditor中的值
		function setKindeditor(){
			//kindeditor支持html的解析
			editor.html("<em><strong>jkdfh</strong></em>");
		}
	</script>
	
	<body>	
		<textarea id="content" style="width:60%;height: 500px;"></textarea>
		<button onclick="setKindeditor();">设置kindeditor的值</button>
	</body>
</html>
